home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Utilities / DVIM72-Mac 1.9.6 / source / Install_help.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-14  |  645 b   |  33 lines  |  [TEXT/R*ch]

  1. #include <Balloons.h>
  2. #include "mac-specific.h"
  3.  
  4. Boolean TrapAvailable( short trapnum );
  5.  
  6. #ifndef GESTALT
  7. #define GESTALT            0xA1AD
  8. #endif
  9.  
  10. extern Boolean            g_help_under_apple;
  11. extern MenuHandle        g_AppleMenu;
  12.  
  13. void    Install_help( void );
  14.  
  15. void    Install_help( void )
  16. {
  17.     MenuHandle    balloon_menu;
  18.     long        response;
  19.     
  20.     g_help_under_apple = !TrapAvailable(GESTALT) ||
  21.         (Gestalt(gestaltHelpMgrAttr, &response) != noErr) ||
  22.         ((response & 1) == 0L) ||
  23.         (HMGetHelpMenuHandle(&balloon_menu) != noErr);
  24.     if (g_help_under_apple)
  25.     {
  26.         InsMenuItem( g_AppleMenu, "\pDVIM72-Mac Manual", 1 );
  27.     }
  28.     else
  29.     {
  30.         AppendMenu( balloon_menu, "\pDVIM72-Mac Manual" );
  31.     }
  32. }
  33.